﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ZhimeiSoft.CharmManager.DOL
{
    /// <summary>
    /// 预约明细记录表
    /// </summary>
    [Serializable()]
    public class DBEntityScheduleCustom : DBEntityBase
    {
        /// <summary>
        /// 表名称
        /// </summary>
        /// <returns></returns>
        public override string GetTableName()
        {
            return "SCHEDULECUSTOM";
        }

        public DBEntityScheduleCustom(DataRow drData)
            : base()
        {
            this.CUSTOMID = Convert.ToInt32(drData["CUSTOMID"]);
            this.SCHEDUEID = Convert.ToInt32(drData["SCHEDUEID"]);
            this.SCALLDATE = Convert.ToDateTime(drData["SCALLDATE"]);
            this.SMEMO = drData["SMEMO"].ToString();
            this.SBESPEAKSTATE = drData["SBESPEAKSTATE"].ToString();
        }

        public DBEntityScheduleCustom()
            : base()
        {
        }
        /// <summary>
        /// 会员ID
        /// </summary>
        public int CUSTOMID { get; set; }
        /// <summary>
        /// 预约时间
        /// </summary>
        public DateTime SCALLDATE { get; set; }
        /// <summary>
        /// 备注说明
        /// </summary>
        public string SMEMO { get; set; }
        /// <summary>
        /// 预约ID
        /// </summary>
        public int SCHEDUEID { get; set; }
        /// <summary>
        /// 预约状态
        /// </summary>
        public string SBESPEAKSTATE { get; set; }
        /// <summary>
        /// 字段名称
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// 员工ID
            /// </summary>
            public const string CUSTOMID = "CUSTOMID";
            /// <summary>
            /// 预约时间
            /// </summary>
            public const string SCALLDATE = "SCALLDATE";
            /// <summary>
            /// 备注说明
            /// </summary>
            public const string SMEMO = "SMEMO";
            /// <summary>
            /// 预约ID
            /// </summary>
            public const string SCHEDUEID = "SCHEDUEID";
            /// <summary>
            /// 预约状态
            /// </summary>
            public const string SBESPEAKSTATE = "SBESPEAKSTATE";
        }
        /// <summary>
        /// C0A 预约完成 C0N 正在预约 C0D预约过期
        /// </summary>
        public static class ENUM_SBESPEAKSTATE {
            /// <summary>
            /// C0A 预约完成
            /// </summary>
            public const string C0A = "C0A";
            /// <summary>
            /// C0N 正在预约
            /// </summary>
            public const string C0T = "C0N";
            /// <summary>
            /// C0D 预约过期
            /// </summary>
            public const string C0D = "C0D";
            /// <summary>
            /// C0A 预约完成
            /// </summary>
            public const string C0A_CHINESE = "预约完成";
            /// <summary>
            /// C0N 正在预约
            /// </summary>
            public const string C0T_CHINESE = "正在预约";
            /// <summary>
            /// C0D 预约过期
            /// </summary>
            public const string C0D_CHINESE = "预约过期";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string EnumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { C0A, C0T, C0D };
                string[] sReturnStr = new string[] { C0A_CHINESE, C0T_CHINESE, C0D_CHINESE };
                return DBEntityBase.GetStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string ChineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { C0A_CHINESE, C0T_CHINESE, C0D_CHINESE };
                string[] sReturnStr = new string[] { C0A, C0T, C0D };
                return DBEntityBase.GetStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
    }
}
